<%@ page contentType="text/html;charset=UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <title>新增用户</title>
</head>
<body>
<h2>新增用户</h2>
<form action="${pageContext.request.contextPath}/user/add" method="post">
    账户：<input type="text" name="username" required><br>
    密码：<input type="password" name="password" required><br>
    角色：
    <select name="role">
        <option value="0">管理员</option>
        <option value="1">普通用户</option>
    </select><br>
    性别：
    <input type="radio" name="sex" value="1" required>男
    <input type="radio" name="sex" value="0" required>女<br>
    年龄：<input type="number" name="age" required><br>
    <button type="submit">提交</button>
</form>
<c:if test="${not empty param.error}">
    <p style="color: red;">${param.error}</p>
</c:if>
</body>
</html>